package com.liuzh.kaoyanspringboot.mapper;

import com.liuzh.kaoyanspringboot.entity.Article;
import com.liuzh.kaoyanspringboot.entity.Concern;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liuzh.kaoyanspringboot.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 刘志鸿
 * @since 2023-04-11
 */
@Mapper
public interface ConcernMapper extends BaseMapper<Concern> {

    List<User> getUsersByMyId(@Param("myId") Integer myId);
    boolean deleteConcern(@Param("myId") Integer myId ,@Param("concernId") Integer concernId);
    boolean isConcern(@Param("myId") Integer myId ,@Param("concernId") Integer concernId);

    List<Article> findConcernArticle(@Param("userId") Integer userId);
}
